﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/Site.Master" CodeBehind="RatingGraph.aspx.vb" Inherits="LondonItalianRestaurants.RatingGraph" %>
<%@ Register assembly="System.Web.DataVisualization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" namespace="System.Web.UI.DataVisualization.Charting" tagprefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <p>
        Total number of rating for each restaurant<br />
        <asp:Chart ID="Chart1" runat="server" BackColor="Orchid" 
            BackGradientStyle="DiagonalRight" BackImageTransparentColor="255, 192, 255" 
            BackSecondaryColor="192, 255, 192" BorderlineColor="Maroon" CssClass="table" 
            DataSourceID="SqlDataSource1" Palette="Berry">
            <series>
                <asp:Series ChartType="StackedBar" Name="Series1" XValueMember="RestaurantName" 
                    YValueMembers="CountOfID">
                </asp:Series>
            </series>
            <chartareas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [RestaurantName], [CountOfID] FROM [CountRating] WHERE ([CountOfID] &gt; ?) ORDER BY [CountOfID]">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="CountOfID" Type="Int32" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        Average Rating for each restaurant</p>
    <p>
        <asp:Chart ID="Chart2" runat="server" BackColor="CornflowerBlue" 
            BackGradientStyle="DiagonalRight" BorderlineColor="Lime" 
            DataSourceID="SqlDataSource2" Palette="Chocolate">
            <series>
                <asp:Series ChartType="StackedBar" Name="Series1" XValueMember="RestaurantName" 
                    YValueMembers="AvgOfID">
                </asp:Series>
            </series>
            <chartareas>
                <asp:ChartArea Name="ChartArea1">
                </asp:ChartArea>
            </chartareas>
        </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource2" runat="server" 
            ConnectionString="<%$ ConnectionStrings:ConnectionString %>" 
            ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" 
            SelectCommand="SELECT [RestaurantName], [AvgOfID] FROM [AverageRating] WHERE ([AvgOfID] &gt; ?) ORDER BY [AvgOfID]">
            <SelectParameters>
                <asp:Parameter DefaultValue="0" Name="AvgOfID" Type="Double" />
            </SelectParameters>
        </asp:SqlDataSource>
    </p>
    <p>
        &nbsp;</p>
    <p>
    </p>
    <p>
    </p>
</asp:Content>
